import { reactive } from 'vue';

export const dialogList = reactive([]);

export const addDialog = (options) => {
	dialogList.push(Object.assign(options, { visible: true }));
};

export const closeDialog = (item, i, args, isNativeClose) => {
	dialogList.splice(i, 1);
	if(item.callBack) item.callBack(...args);
	// if (!isNativeClose) item.callBack && item.callBack(...args);
};
